package cn.zxl.spring.holiday.job.web.controller.advice;

import org.apache.shiro.authz.AuthorizationException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * @Date 2021/10/6 23:56
 * @Version 1.0
 * @Description
 */
@ControllerAdvice
public class CommonControllerAdvice {

    @ExceptionHandler(AuthorizationException.class)
    public String exHandler(AuthorizationException ex) {
        ex.printStackTrace();
        return "common/nopermission";
    }
}
